/**********************************************************************
 Name:  GetOrderSign
 Purpose:显示order附近签名                                                           
-------                                                             
======================================================
History                                                            
-------                                                            
VERSION    AUTHOR                  DATE                 DETAIL                                
   1.0 -        huangxiaojiang       07/16/2011         Create  
*********************************** ************************************/

public with sharing class GetOrderSignControl{
     // Constructors
     public  GetOrderSignControl(ApexPages.StandardController controller){

      }
      
     //getter & setter methods
     public string ImgUrl{
         get;
         set;
     }
     
     public PageReference pageLoadAction(){
     
         string orderId=System.currentPageReference().getParameters().get('id');//获取orderid
         list<attachment> lAtt=[select id from attachment where parentId=:orderId];
         string attaId='';
         if(lAtt.size()>0){
             attaId=lAtt[0].id;
             //生成附件链接id
             ImgUrl=URL.getSalesforceBaseUrl().toExternalForm()+ '/servlet/servlet.FileDownload?file='+attaId;
         }

         
         return null;
     }
     
      
}